<!--
This example demonstrates how to set left and right editors using ajax.
-->
<!DOCTYPE HTML>
<html lang="en">
<head>
	<meta charset="utf-8" /><title>Mergely - Simple Example</title>
	<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
	<meta name="description" content="Merge and Diff your documents with diff online and share" />
	<meta name="keywords" content="diff,merge,compare,jsdiff,comparison,difference,file,text,unix,patch,algorithm,saas,longest common subsequence" />
	<meta name="author" content="Jamie Peabody" />

	<!-- Requires jQuery -->
	<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script>
	<!-- Optional jquery.corner for rounded buttons -->
	<script src="jquery.corner.js" type="text/javascript"></script>
	
	<!-- Requires CodeMirror 2.16 -->
	<script type="text/javascript" src="../lib/codemirror.min.js"></script>
	<link type="text/css" rel="stylesheet" href="../lib/codemirror.css" />
	
	<!-- Requires Mergely -->
	<script type="text/javascript" src="../lib/mergely.js"></script>
	<link type="text/css" rel="stylesheet" href="../lib/mergely.css" />
	
	<script type="text/javascript">

        $(document).ready(function () {
			$('#compare').mergely({
				cmsettings: { readOnly: false },
			});
			$.ajax({
				type: 'GET', async: true, dataType: 'text',
				url: 'lhs.txt',
				success: function (response) {
					$('#compare').mergely('lhs', response);
				}
			});
			$.ajax({
				type: 'GET', async: true, dataType: 'text',
				url: 'rhs.txt',
				success: function (response) {
					$('#compare').mergely('rhs', response);
				}
			});
		});
	</script>
</head>
<body>

	<div id="mergely-resizer">
		<div id="compare">
		</div>
	</div>

</body>
</html>
